module.exports = function($scope, $modal, $resource, toaster){

    $scope.bigCurrentPage = 1;      //当前页码
	$scope.itemsPerPage = 10;       //每页显示几条

	$scope.countNum = function(){
		$resource('/api/as/puc/subsidycount/getCountForBank', {}, {}).save({'bank':'1'}, function(res){
            if(res.errcode === 0){
				$scope.send_money = res.data.send_money;
            } else {
                toaster.error({title: '', body: '统计失败'});
            }
        });
	}
	$scope.countNum();
    
    $scope.load = function(pageNo){
        var para = {
            'pageNo': pageNo, 
			'pageSize': $scope.itemsPerPage,
			'is_grant': '1'
        };
        $resource('/api/ac/puc/subsidyCountService/findBankCountList', {}, {}).save(para, function(res){
            if(res.errcode === 0){
				$scope.list = res.data.results;
				$scope.totalItems = res.data.totalRecord;
				$scope.bigCurrentPage = pageNo;
            } else {
                toaster.error({title: '', body: res.errmsg});
            }
        });
	};
	$scope.load(1);


};